<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>博客编辑页</title>
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/blog_edit.css"> 

    <!-- 引入md依赖 -->
    <!-- <link rel="stylesheet" href="editor.md/css/editormd.min.css" />
    <script src="js/jquery.min.js"></script>
    <script src="editor.md/lib/marked.min.js"></script>
    <script src="editor.md/lib/prettify.min.js"></script>
    <script src="editor.md/editormd.js"></script> -->
    <script src="js/jquery.min.js"></script>
    <link rel="stylesheet" href="editor.md/css/editormd.min.css">
    <script src="editor.md/lib/marked.min.js"></script>
    <script src="editor.md/lib/prettify.min.js"></script>
    <script src="editor.md/editormd.js"></script>
</head>
<body>
    <!-- 导航栏 -->
    <div class="nav">
        <img src="image/login.jpg" alt="">
        <span class="title">我的博客系统</span>
        <!-- 这个spacer用来占位 -->
        <span class="spacer"></span>

        <a href="blog_list.html">主页</a>
        <a href="blog_edit.html">写博客</a>
        <a href="logout">注销</a>
    </div>

    <div class="blog-edit-container">
        <form action="blog" method="post" style="height: 100%;">
            <!-- 标题编辑区 -->
            <div class="title">
                <input type="text" id="title" placeholder="请输入文章标题" name="title">
                <input type="submit" id="submit" value="发布文章">
            </div>
            <!-- 博客编辑器 -->
            <div id="editor">
                <textarea name="content" style="display: none;"></textarea>
            </div>
        </form>
    </div>

    <script>
        var editor = editormd("editor", {
            width: "100%",
            height: "calc(100% - 50px)",
            markdown: "# 在这里写下一篇博客",
            path: "editor.md/lib/",
            // 把编辑器里面的内容自动保存到textarea
            saveHTMLToTextArea: true
        });
    </script>

</body>
</html>